package com.gxuwz.eschool.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import androidx.fragment.app.Fragment;

import com.gxuwz.eschool.BalanceActivity;
import com.gxuwz.eschool.CardLoseActivity;
import com.gxuwz.eschool.CardNoLockActivity;
import com.gxuwz.eschool.ChargeActivity;
import com.gxuwz.eschool.NewsActivity;
import com.gxuwz.eschool.PayRecordActivity;
import com.gxuwz.eschool.PaymentActivity;
import com.gxuwz.eschool.R;
import com.gxuwz.eschool.SchoolInfoActivity;


public class HomeFragment extends Fragment {
    TextView tv;
    public HomeFragment() {

    }
    @Override
    public void onCreate(Bundle savedInstanceState) {



        super.onCreate(savedInstanceState);
    }
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_home, container, false);

        tv = view.findViewById(R.id.home_pay);
        tv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent i = new Intent(getActivity(), PaymentActivity.class);
                startActivity(i);
            }
        });
        tv = view.findViewById(R.id.home_pay1);
        tv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent i = new Intent(getActivity(), PaymentActivity.class);
                startActivity(i);
            }
        });

        tv = view.findViewById(R.id.home_charge);
        tv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent i = new Intent(getActivity(), ChargeActivity.class);
                startActivity(i);
            }
        });


        tv = view.findViewById(R.id.home_balance);
        tv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent i = new Intent(getActivity(), BalanceActivity.class);
                startActivity(i);
            }
        });


        tv = view.findViewById(R.id.school_info);
        tv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent i = new Intent(getActivity(), SchoolInfoActivity.class);
                startActivity(i);
            }
        });

        tv = view.findViewById(R.id.news);
        tv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent i = new Intent(getActivity(), NewsActivity.class);
                startActivity(i);
            }
        });

        tv = view.findViewById(R.id.home_charge1);
        tv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent i = new Intent(getActivity(), ChargeActivity.class);
                startActivity(i);
            }
        });

        tv = view.findViewById(R.id.card_lose);
        tv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent i = new Intent(getActivity(), CardLoseActivity.class);
                startActivity(i);
            }
        });
        tv = view.findViewById(R.id.card_no_lock);
        tv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent i = new Intent(getActivity(), CardNoLockActivity.class);
                startActivity(i);
            }
        });

        tv = view.findViewById(R.id.pay_record);
        tv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent i = new Intent(getActivity(), PayRecordActivity.class);
                startActivity(i);
            }
        });

        return view;
    }


}